import React, { Component } from 'react';

import './App.css';

import Home from "./components/home/home"

//view的子路由之每日推荐
import Daily from "./components/view/daily/daily"

//view的子路由之歌单
import SongList from "./components/view/songList/songList"

//view的子路由之排行
import Range from "./components/view/range/range"

import FM from "./components/view/FM/FM"
import DjDetails from './components/view/FM/djDetails'
import Catelist from './components/view/FM/catelist'
import Paylist from './components/view/FM/paylist'
import DjRange from './components/view/FM/range'
import Lesson from './components/view/FM/lesson'

import Search from "./components/Search/search"

// import BroadCast from "./components/broadCast/broadCast";
import BroadCast from "./containers/BroadCastContainer";


// import DetailSongList from "./components/detailSongList/detailSongList"
import DetailSongList from "./containers/DetailSongSheetContainer"

import MvDetail from "./components/mvDetail/mvDetail"

import Login from "./components/login/login"
import searchBroadCast from "./components/searchBroadCast/searchBroadCast"

import {BrowserRouter as Router,Route,Redirect,Switch} from "react-router-dom"

class App extends Component {
  render() {
    return (
      <div className="SongApp">
         <Router>
             <Switch>
              <Route path="/home" component={Home}/>
                <Route path="/login" component={Login} />
                {/* <Home/> */}
                <Route path="/daily" component={Daily}/>
                <Route path="/SongList" component={SongList}/>
                <Route path='/Range/topListDetails/:id' component={DetailSongList} />
                <Route path="/Range" component={Range}/>
                <Route path="/FM/djDetails/:id" component={DjDetails}/>
                <Route path='/FM/catelist' component={Catelist} />
                <Route path='/FM/paygift' component={Paylist} />
                <Route path='/FM/lesson' component={Lesson} />
                <Route path='/FM/range' component={DjRange} />
                <Route path="/FM" component={FM}/>
                <Route path="/BroadCast" component={BroadCast}/>
                <Route path="/search" component={Search}/>
                <Route path="/detailSongList" component={DetailSongList}/>
                <Route path="/mvDetail" component={MvDetail}/>
                <Route path="/searchBroadCast" component={searchBroadCast} />
                 {/* 重定向 */}
                <Redirect from="/" to='/home/view' /> 
             </Switch>
         </Router>
      </div>
    );
  }
}

export default App;
